

const { log } = require('console');

const express = require('express');

const router = require('./router');

// 接收post数据
const bodyParser = require('body-parser');


// 创建服务

const app = express();

// 接收post数据
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json())

// 处理静态资源
// app.use('/', express.static('../client/html/index.html'));
app.use('/static', express.static('../client/'));



app.use('/api', router)


app.listen(2000, () => log('666'))